Repository navigation
client: a read-only window draws no DSH Agent or session menu write - #2272
Conversation
ce30175 to
dc8d3a1
Compare
|
Written-by: Dev3 @Birfy — Advisory PASS by FlyBot Test at this tip (independent recheck): red-first on clean 551375d with only the new test was 4 tests / 2 pass / 2 fail — a read-only window still offered Tip |
The DSH Agent row's menu painted Pin, Unpin and Remove DSH Agent, and a Session's menu painted Rename and Archive, even when the roster said the window is read-only: the host refuses set-flags, remove-agent, agent-rename and agent-archive for such a window, so the row only produced a failure toast. Compute one `locked` from `roster.readOnly` the way the Bot menu already does and drop those rows there; with every row hidden the menu draws nothing rather than an empty box. Refs ThinkFlowLab#2253.
Fixes #2271
Written-by: Dev3
Owner: Dev3
Reviewer: Birfy
Claim-Id: 10086412d5f44cf6a6c788d4df73bc08
Branch: dev/3-agent-menu-readonly
Base: 551375d
Tree: db9a8ef61a66a532e53814e09a709e459b1c75bc
Verified commit: dc8d3a1
Pushed head: dc8d3a1
Scope
A read-only FlyBot window still draws the DSH Agent menu's
Pin/UnpinandRemove DSH Agent, and a session menu'sRenameandArchive, although the host refuses all four (set-flags,remove-agent,agent-renameandagent-archiveare not reads) so each row only ends in a failure toast.AgentMenunow reads the roster's read-only sentence once, the same way the rest of the client does, and drops those four rows; a writable window keeps every row exactly as it is, and a menu whose every row is a write is not drawn at all instead of leaving an empty box.Files
core/src/client/context-menu.js— the gate inAgentMenucore/test/context-menu-agent-readonly.test.js— the test and its counter-proofsdocs/subsystems/core-client.md— the owned docchangelog.d/2271-agent-menu-readonly.fixed.md— the fragmentcore/client.js— the regenerated bundlepatches/ds-bot/0003-flybot-api-client.patch,patches/ds-bot/0008-client-bundle.patch,patches/ds-bot/files/test/context-menu-agent-readonly.test.js— the regenerated mirrorsReady for review at the tip above.
Checkpoint
{ "pr": 2272, "claim": "Dev3", "issue": 2271, "summary": "AgentMenu now reads the roster's read-only sentence the same way the rest of the client does, so a locked window draws no Pin/Unpin, Remove DSH Agent, Rename or Archive row. A menu whose every row is a write is not drawn at all instead of leaving an empty box. A writable window keeps every row exactly as it was, and the new test pins the same rendering. The owned subsystem doc and the changelog fragment carry the change.", "files": [ "core/src/client/context-menu.js", "core/test/context-menu-agent-readonly.test.js", "docs/subsystems/core-client.md", "changelog.d/2271-agent-menu-readonly.fixed.md", "core/client.js", "patches/ds-bot/0003-flybot-api-client.patch", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/test/context-menu-agent-readonly.test.js" ], "checks": { "ran": "npm run build (core); node scripts/ds-bot-patches.mjs generate, canonical and check; node core/scripts/build-client.mjs --check; TZ=UTC ARCH_DOCS_BASE=551375dd npm run verify", "result": "green", "at": "dc8d3a15aacf86dacb051f6f50d1fd6fe6afdf21" }, "next": "none — ready for review" }